package com.xiaoxu.intranetweb.mybatisplusSzappdb.controller.gps;

import com.alibaba.fastjson.JSONObject;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.business.gps.GpsBU;
import com.xiaoxu.intranetweb.util.SzResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/gps18")
public class Gps18Controller {
    @Autowired
    private GpsBU gpsBU;
    @PostMapping("/getHistoryTrack")
    public SzResult getHistoryTrack(@RequestBody JSONObject jsonParam,  HttpServletRequest request) {
        String plantId = request.getHeader("Plant-Id");
        String weightSheetId = jsonParam.getString("weightSheetId");
      return  gpsBU.getHistoryTrack(plantId,weightSheetId);
    }
}
